# -*- coding: utf-8 -*-
# @Time    : 2019/3/1 10:49
# @Author  : shaoeric
# @Email   : shaoeric@foxmail.com
import numpy as np


class Accuracy:
    def __init__(self, predict_array, true_array):
        self.predict = predict_array
        self.true = true_array

    def get_acc(self):
        return np.sum(self.predict == self.true)/np.size(self.predict)
